package com.zhang.controller;

import com.zhang.producer.StreamBridgeProducer;
import com.zhang.producer.StreamBridgeProducer2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package: com.zhang.controller
 * @ClassName: SendController
 * @Author: Think
 * @CreateTime: 2021/7/19 10:53
 * @Description:
 */
@RestController
public class SendController {

    @Autowired
    private StreamBridgeProducer streamBridgeProducer;
    @Autowired
    private StreamBridgeProducer2 streamBridgeProducer2;

    @GetMapping("/sendMessage")
    public String sendMessage(){
        streamBridgeProducer.sendDateMessage();
        return "OK";
    }

    @GetMapping("/sendMessage2")
    public String sendMessage2(){
        streamBridgeProducer2.sendDateMessage2();
        return "OK2";
    }

}
